package com.lottery.game.common;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * @Description TODO
 * @Classname BasePage
 * @Date 2019/4/23 14:55
 * @Author liusc <liushicheng1993@vip.qq.com>
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "分页Model")
public class BasePage<T> {

    @ApiModelProperty(value = "页码", dataType = "Integer",example = "1",required = true)
    private Integer page;

    @ApiModelProperty(value = "每页行数", dataType = "Integer",example="10",required = true)
    private Integer rows;

    @ApiModelProperty(value = "对象", required = false)
    private T data = null;

    @ApiModelProperty(value = "创建结束日期 yyyy-MM-dd", dataType = "String",example="2020-04-15",required = true)
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String endDate;

    @ApiModelProperty(value = "创建开始日期 yyyy-MM-dd", dataType = "String",example="2018-04-15",required = true)
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String startDate;

}
